package com.blockmeta.bbs.businesslibrary.util.navigation.impl;

import android.net.Uri;
import android.text.TextUtils;

import com.blockmeta.bbs.businesslibrary.arouter.RouterPath;
import com.blockmeta.bbs.businesslibrary.constant.Constant;
import com.blockmeta.bbs.businesslibrary.util.navigation.SimpleDeepLinkStrategy;

import java.util.HashMap;
import java.util.Map;

/**
 * @author AirThor
 * @date 2019/7/25.
 * "blockmeta://message/system" "blockmeta://message/user"
 */
public class MessageStrategy extends SimpleDeepLinkStrategy {
    @Override
    public Uri uriTransformer(Uri uri) {
        return Uri.parse("blockmeta://message"+ RouterPath.MY_MESSAGE_ACTIVITY);
    }

    @Override
    public Map<String, String> navigationParams(Uri uri) {
        HashMap<String,String> params = new HashMap<>(2);
        if (TextUtils.equals(uri.getPath(),"/user")){
            params.put(Constant.ZERO,"1");
            return params;
        }
        return null;
    }
}
